n = int(input())
m = int(input())
print(f"{sum((m-i)*n*10**i for i in range(0,m))}")